package net.jsoft.platform.schedule.job;

import java.util.Date;

import org.apache.commons.lang3.time.FastDateFormat;
import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.stereotype.Component;

@Component
public class TestSchedule extends BaseJob
{
    FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");

    @Override
    public void doExecute(JobExecutionContext context) throws JobExecutionException
    {
        JobDataMap dataMap = context.getJobDetail().getJobDataMap();
        String strData = dataMap.getString("ip");
        System.out.println("[JobDetail Description]" + strData);
        System.out.println("[CronJob Execute]" + fdf.format(new Date()));
    }
}